package com.wanmait.schedule.service.impl;

import com.wanmait.schedule.entity.Admin;
import com.wanmait.schedule.mapper.AdminMapper;
import com.wanmait.schedule.service.AdminService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;

/**
 * <p>
 * 管理员 服务实现类
 * </p>
 *
 * @author wanmait
 * @since 2022-03-02
 */
@Service
public class AdminServiceImpl extends ServiceImpl<AdminMapper, Admin> implements AdminService {

    @Resource
    private AdminMapper adminMapper;
    @Override
    public List<Admin> select(Admin admin) {
        HashMap<String,Object> map = new HashMap<>();
        map.put("account",admin.getAccount());
        map.put("password",admin.getPassword());
        List<Admin> select = adminMapper.selectByMap(map);
        return select;
    }
}
